﻿@model IEnumerable<GameSchool.Models.Game>
@{
    ViewBag.Title = "Leikir";
}
<!--Brauðmolar-->
<ul class="breadcrumb">  
	<li><a href="/Home">Forsíða</a> <span class="divider">></span></li>  
	<li class="active">@ViewBag.Title</li>  
</ul>
<!--Brauðmolar enda-->
<table class="table table-striped table-bordered table-condensed">
    <thead>
        <tr>
            @*<td>ID</td>*@
            <td>Nafn leiks</td>
			@if (User.IsInRole("admin"))
					{
						<td>Aðgerð</td>
					}
        </tr>
    </thead>
@foreach (var n in Model)
{
    <tr>
        @*<td>@n.ID</td>*@
        <td><a href="/Game/viewGame/@n.ID">@n.Name</a></td>
		@if (User.IsInRole("admin"))
		{
			<td><a href="/Game/editGame/@n.ID">Breyta</a></td>
			<td><a href="/Game/deleteGame/@n.ID">Eyða</a></td>
		}
    </tr>
}
</table>